#ifndef CUSTOMDEBUGOUT_H
#define CUSTOMDEBUGOUT_H

#include <qapplication.h>
#include <qdebug.h>
#include <qfile.h>
#include <qtextstream.h>

void customDebugOut(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
#ifdef NORMAL_TEST
    QString fileName = "debug_gl_begin_end";
#endif
#ifdef CUT_TEST
    QString fileName = "debug_cut_test";
#endif
#ifdef AREA_TEST
    QString fileName = "area_test";
#endif
    QFile file(fileName);
    file.open(QIODevice::WriteOnly | QIODevice::Append);
    QTextStream stream(&file);
    stream << msg << endl;
    file.close();
}

#endif // CUSTOMDEBUGOUT_H
